﻿using System;
using System.Windows.Input;
using Refract.Navigation;
using Refract.Views;

namespace Refract
{
    /// <summary>
    /// Describes the interface for the navigation class
    /// </summary>
    public interface INavigator
    {
        /// <summary>
        /// Closes any active page.
        /// </summary>
        void Clear();

        /// <summary>
        /// Goes to the specified page.
        /// </summary>
        /// <param name="pageName">Name of the page.</param>
        void Goto(string pageName);

        /// <summary>
        /// Registers a page.
        /// </summary>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="viewModelType">Type of the view model.</param>
        /// <param name="targetComand">The target comand.</param>
        /// <returns></returns>
        INavigator RegisterPage(string pageName, Type viewModelType);

        /// <summary>
        /// Registers a page.
        /// </summary>
        /// <typeparam name="TViewModel">The type of the view model.</typeparam>
        /// <param name="pageName">Name of the page.</param>
        /// <param name="targetComand">The target comand.</param>
        /// <returns></returns>
        INavigator RegisterPage<TViewModel>(string pageName) where TViewModel : ViewModel;

        /// <summary>
        /// Gets the page items.
        /// </summary>
        /// <value>The page items.</value>
        PageItemList PageItems { get; }
        
    }
}
